package com.liangzhong.model.guide.vo
{
	/**
	 *引导选择角色vo 
	 * @author lake
	 * 
	 */	
	public class GuidePlayerVo
	{
		public var pid	:String;
		/**
		 *球员位置 (char 2) 
		 */
		public var place:String;
		/**
		 *球员号 
		 */
		public var number:int;
		/**
		 *球员姓名 (string) 
		 */
		public var pname:String
		/**
		 *球员能力值 (int) 
		 */
		public var abiliy:int;
		/**
		 *球员头像1 (string) 
		 */
		public var headurl1:String;
		/**
		 *进攻 (int) 
		 */
		public var s1:int;
		/**
		 *控球 (int) 
		 */
		public var s2:int;
		/**
		 *力量 (int) 
		 */
		public var s3:int;
		/**
		 *防守 (int) 
		 */
		public var s4:int;
		/**
		 *抢断 (int) 
		 */
		public var s5:int;
		/**
		 *速度 (int) 
		 */
		public var s6:int;
		
		public var arrowValues :Array = [{s:1,v:0},{s:2,v:0},{s:3,v:0},{s:4,v:0},{s:5,v:0},{s:6,v:0}];
		
		public function GuidePlayerVo()
		{
		}
		
		public function initArrowValue():void
		{
			for(var i :int = 0;i < 6;i++)
			{
				arrowValues[i].v = this["s" + (i+1)];
			}
		}
		
		public function get p():int
		{
			var frame :int = 1;
			switch(place)
			{
				case "FW":
				{
					frame = 1;
					break;
				}
				case "MF":
				{
					frame = 2;
					break;
				}
				case "DF":
				{
					frame = 3;
					break;
				}
			}
			return frame;
		}
		
		public function parse(data :Object):void
		{
			pid 	= data.pid;
			s1 		= data.s1;
			s2 		= data.s2;
			s3 		= data.s3;
			s4 		= data.s4;
			s5 		= data.s5;
			s6 		= data.s6;
			place   = data.place;
			abiliy	= data.abiliy;
		}
	}
}